<template lang="">
  <div>
    <svg-icon icon-class="fullscreen" @click="changeScreen"></svg-icon>
  </div>
</template>
<script>
  import ScreenFull from 'screenfull/dist/screenfull'
  export default {
    methods: {
      changeScreen () {
        if (!ScreenFull.isEnabled) {
          this.$message.warning('此时全屏不可用')
          return
        }
        // document.documentElement.requestFullscreen()  原生js调用
        //   如果可用 就可以全屏
        ScreenFull.toggle()
      }
    },
  }
</script>
<style lang="">

</style>